import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import * as Sentry from "@sentry/browser";
import { Vue as VueIntegration } from "@sentry/integrations";
import { Integrations } from "@sentry/tracing";

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");

// 开发环境不上报错误
if (process.env.NODE_ENV !== "development") {
  Sentry.init({
    dsn: "http://766c5b6828d540e2b7e1324ccdabc270@localhost:9000/2",
    integrations: [
      new VueIntegration({ Vue, tracing: true }),
      new Integrations.BrowserTracing(),
    ],
    tracesSampleRate: 1,
    logErrors: true,
    release: "pro@1.0.1",
  });
}
